/*
 * @Description:
 * @Author: cgt
 * @Date: 2021-10-20 17:40:38
 * @LastEditors: cgt
 * @LastEditTime: 2021-12-28 19:41:39
 */
/**
 * @module init/initStyleList
 * @desc 初始化电网式样
 */

import { initialStyleList } from '../../../mapUtils/StyleListUtil';

/**
 * 初始化电网式样
 * @param {Map} top 地图开放顶层
 */
export function initStyleList(top) {
  return new Promise((resolve) => {
    top.api.PwghGhsjScTxfw.figure
      .get_figure_getDrawNewStyleList({
        params: {
          // eslint-disable-next-line camelcase
          sys_dsnos: top.config.get('SYS_DSNOS').join(',')
        }
      })
      .then((res) => {
        initialStyleList(res.datas);
        resolve();
      });
  });
}
